package cn.momoky.ccool.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

@Data
@Accessors(chain = true)
@TableName("t_file_node")
public class FileNode {

    private Long id;
    private String name;
    private String path;
    private Boolean isDir;
    @TableField("`type`")
    private String type;
    private Long size;
    private Integer state;
    private Long createTime;
    private Long lastModified;
    private Long parentId;
    @TableField("`left`")
    private Integer left;

    @TableField("`right`")
    private Integer right;

    @TableField(exist = false)
    private List<FileNode> children = new ArrayList<>();
}
